There have been techniques for detecting a rotation angle from normal position of an image.
For example, the following patent literature 1 discloses processing in which the rotation angle (inclination) from normal position of a scanned-in document image is automatically detected and a rotation-corrected image in normal position is generated. According to the patent literature 1, two partial areas of a document image are selected; data projected in each of the partial areas is generated; and the inclination angle of the image is determined based on the correlation between the two projected data. In doing this, based on the amounts of projection in the two selected partial areas, whether sentences are broken to be discontinuous in the selected areas is checked so as to select areas where sentences are continuous.
Also, the following non-patent literature 1 states that it is desirable to rotate a document image repeatedly by a micro-angle while taking a projection at every rotation angle and determining the image position where the absolute value of the difference between projections is the largest as a normal position. Rotating a document image repeatedly by a micro-angle is, however, unrealistic as doing so requires a large volume of calculations to be made. Hence, an image is compressed into an 8*8 size; an approximate angle is roughly determined; an image rotation-corrected by the approximate angle is generated; a partial area of the image is divided into plural zonal areas; each of the plural zonal areas is projected; and the inclination angle of the image is determined based on the phase (displacement magnitude associated with large correlation) of projection of each zonal area.
According to the following non-patent literature 2, a document image is Fourier-transformed, and the rotation angle from normal position of the document image is detected based on a peak position.